import { rejectedColumns } from './rejected.config.js'
import search from './../search/search.js';
export default {
    name: "rejected",
    mixins: [search],
    data() {
        return {
            rejectedColumns,
            loading: false,
            loadData: [{
                id: 1,
                fs:'http://img3.imgtn.bdimg.com/it/u=1940916231,627575868&fm=26&gp=0.jpg'
            }],
            pagination: {
                total: 0,
                current: 1,
                pageSize: 10,
                showSizeChanger: true,
                showTotal: total => `共有${total}条`
            },
            selectedRowKeys: [],  //选中的数组
            selectedRows: [],
            number: 0,
            btn: [
                {
                    title: "提交审核",
                    isShow: true
                },
                {
                    title: "删除",
                    isShow: true
                },
                {
                    title: "导出",
                    isShow: true
                },
            ]
        }
    },
    methods: {
        getList(searchForm, page) {
            if (searchForm) {
                console.log(searchForm)
            }
            if (page) {
                this.pagination.current = page
            }
            setTimeout(() => {
                this.pagination.total = 22
                this.$emit("trigger")
            }, 500)
        },
        handleTableChange(pagination) {
            this.pagination.current = pagination.current
            this.pagination.pageSize = pagination.pageSize
            this.getList()
        },
        onSelectChange(selectedRowKeys, selectedRows) {
            this.selectedRowKeys = selectedRowKeys
            this.selectedRows = selectedRows;
            this.number = this.selectedRows.length
        },
        // 清空选中项
        clearSelection() {
            this.selectedRowKeys = []
            this.number = 0
        },
        handler(index) {
            if (index == 0) {
                this.submitShenHe()
            } else if (index == 1) {
                this.delete()
            } else if (index == 2) {
                this.export()
            }
        },
        // 提交审核
        submitShenHe() {

        },
        // 删除
        delete() {

        },
        // 导出
        export() {

        }
    }

} 